import router from '@/router';
const func = (el, binding) => {
	if (!binding || !binding.arg) {
		return;
	}
	//获取用户系统级权限
	let systemPrivileges = $store.user.systemPrivileges;
	if (systemPrivileges && (systemPrivileges.indexOf('ALLFUNCTION') >= 0 || systemPrivileges.indexOf('SUPERADMIN') >= 0)) {
		return;
	}
	let thisPageFuncList: any = router.currentRoute.value.meta.funcList;
	if (!thisPageFuncList || thisPageFuncList.indexOf(binding.arg) < 0) {
		let funcStyle = import.meta.env.VITE_APP_FUNC_STYLE as string;
		if (funcStyle) {
			el.style[funcStyle] = 'none';
		}
	}
};

export default func;
